import React from 'react';
import {View} from '@tarojs/components'
import {AtIcon} from 'taro-ui'
import './shop-car.scss'

const ShopCar: React.FC<{ shopNum?: any; onGotoCar?: any; moveRight?: boolean }> = (props) => {

  return (

    <View className='shop-car-root'>
      <View onClick={props.onGotoCar} className={`shop-car-box ${props.moveRight ? 'right' : 'left'}`}>
        <AtIcon value='icon icon-zhangdan-01' size='30' customStyle='font-size: 30px' color='#000' />
        {props.shopNum > 0 && <View className='shop-num'>{props.shopNum}</View>}
      </View>
    </View>
  )
}
ShopCar.defaultProps = {
  shopNum: 0,
  moveRight: false
}


export default ShopCar
